//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_joingr.sqf"
#include "xr_macros.sqf"

//if (!isNull GVARXR(pl_group)) then {
//	[player] joinSilent GVARXR(pl_group);
//} else {
//	private ["_newg"];
//	_newg = createGroup GVARXR(side_pl);
//	[player] joinSilent _newg;
//	if (d_player_str_group != "") then {
//		[QGVARXR(setgid), [player, d_player_str_group]] call d_fnc_NetCallEvent;
//	};
//};
__TRACE("joingr");
if (__pGetVar(GVARXR(isleader))) then {
	[QGVARXR(grpl), [GVARXR(pl_group), player]] call d_fnc_NetCallEventSTO;
};
__pSetVar [QGVARXR(isleader), false];